UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3GLiRMxMjhE0XK2JeQ/+XN0HdSVQu3LFBjOTduaKW5Y='
WHERE
key_id = 'e12136dac7fddbee6ab9e40e47c7f8675a86d0b1e4bcbc017913ab691ac7dad7'
AND (
token = '3GLiRMxMjhE0XK2JeQ/+XN0HdSVQu3LFBjOTduaKW5Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)