UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kETT6RYh/9hkYAgR9bHJev3N5PFOy733sInhlwWZOuE='
WHERE
key_id = '84e0db69996bb02cb6ad3112dcb977d2bf9154ba8f9c8975a1e5d21873f09217'
AND (
token = 'kETT6RYh/9hkYAgR9bHJev3N5PFOy733sInhlwWZOuE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)