UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Gg00ply/8nh5+hczjQEFnvv5yRf4xf33RYWOGALcpwA='
WHERE
key_id = '272f233602c7fc08b7d4c78b39ccf5e3ee36e045feb63c939ade9e79efd5ef22'
AND (
token = 'Gg00ply/8nh5+hczjQEFnvv5yRf4xf33RYWOGALcpwA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)