UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Z/CGEzohwP3SbFVAR5331QEy59fvv71pY9jH0FdWD+c='
WHERE
key_id = '11ba5963b1d9bc0a35187185bfbf1067b09d26773028bb35c9fa3ac0a1fa642b'
AND (
token = 'Z/CGEzohwP3SbFVAR5331QEy59fvv71pY9jH0FdWD+c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)