UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vWF6o8uRDT9C4+lrXuT5m+E24DSHmDblTubEysyVrbk='
WHERE
key_id = '389b93e85b1fde8024ce0d1cf015d4b3f913f2b8a6ad912387b14faf0509d3f7'
AND (
token = 'vWF6o8uRDT9C4+lrXuT5m+E24DSHmDblTubEysyVrbk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)