UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2goByr2Cak7I6JzC653TGqzR/QZzFpVSEn4uwtEiR3E='
WHERE
key_id = 'cef7d1ec678dd5fe66322ac549753358cd711a1506bcefc62119cec8a16cafa7'
AND (
token = '2goByr2Cak7I6JzC653TGqzR/QZzFpVSEn4uwtEiR3E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)