UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'au/rWtThTBTxyndMvPozan6kf9suJ9873yBSAfvFSO8='
WHERE
key_id = 'd79b675d1441c5f206c882a5bebd6d74a20f6bfb6291d71bd6cb60554c508948'
AND (
token = 'au/rWtThTBTxyndMvPozan6kf9suJ9873yBSAfvFSO8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)