UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Uh+AnKJZZukxN1JYFhLDbukRgFy9UjuMLOeHJ6g5N98='
WHERE
key_id = '09aa68aa182f34c775948c63cf07de19e8b0fcafa501dc8d69c1018292913dee'
AND (
token = 'Uh+AnKJZZukxN1JYFhLDbukRgFy9UjuMLOeHJ6g5N98='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)