UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kevmyGA8E/uU16QK31K97CsZ4cpy8o2x+cFUxdHX3KY='
WHERE
key_id = '0c1379da2ced8021d46b069664f6193e20f332e7ee7a4126ffd6809d3f784f89'
AND (
token = 'kevmyGA8E/uU16QK31K97CsZ4cpy8o2x+cFUxdHX3KY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)