UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gis/Rsq2TWPEOsN5mk5uMvV5oAiX2rpcr+0Qkaj3qJE='
WHERE
key_id = '2129f640d1c7ce14fa64ec9443becd689d892f1ad58018cde645c64ac09a8c3f'
AND (
token = 'gis/Rsq2TWPEOsN5mk5uMvV5oAiX2rpcr+0Qkaj3qJE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)