UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vJvHuGN5ybctAhgz+lU1BpFOpzKUp7mMwNEEWt2tZ/I='
WHERE
key_id = '2d304b247ca1492d193ab5db5e97e9e6ac730db494dbe60ba586de4e082d389e'
AND (
token = 'vJvHuGN5ybctAhgz+lU1BpFOpzKUp7mMwNEEWt2tZ/I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)