UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DF86keZj+WsZfyL5Fb4wPMK3HxY9JlMLZTlWipKk9u4='
WHERE
key_id = 'bada2c88b1f9a6f71362899be47001a47c9ae60a0f3fbc17cff498d4833af094'
AND (
token = 'DF86keZj+WsZfyL5Fb4wPMK3HxY9JlMLZTlWipKk9u4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)