UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fEcrMR1q12dVUtRjiBxQXyt2LYc5GdSTeYhRxe9cGNg='
WHERE
key_id = '041845e5d5a709ba48ba5d6d85ebc258b306d41835f5cefff50f0b13c188a6af'
AND (
token = 'fEcrMR1q12dVUtRjiBxQXyt2LYc5GdSTeYhRxe9cGNg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)