UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NVkkFIhPC6BXrU99eyoIOndFDNylpCvJ3c/QqTVnYqQ='
WHERE
key_id = '5fbea22c6e6a4d7a5646e6f81a65620ba24943f6a3fcc0e33d5eca03920f928d'
AND (
token = 'NVkkFIhPC6BXrU99eyoIOndFDNylpCvJ3c/QqTVnYqQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)