UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E2B8ZJl0I3kcBkvMvO/f0k8oW08Uo3t9cbUJaNsOYv0='
WHERE
key_id = 'c4e6359bb02ac44a3a8b642b5a9b26b7a9700193ab27bdf0937047c17adcacc8'
AND (
token = 'E2B8ZJl0I3kcBkvMvO/f0k8oW08Uo3t9cbUJaNsOYv0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)