UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'a2ShQCLssP3MB/3E1nBtCMZNG4Tx9je+YoqJ/dvZiK8='
WHERE
key_id = 'd13c68b454520bd3ccf945209a20a20fd45467e64d6f2a2746b76a61276ba844'
AND (
token = 'a2ShQCLssP3MB/3E1nBtCMZNG4Tx9je+YoqJ/dvZiK8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)