UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WP1+yLVeZp2Jp0nyRQ6R0hgAariCNoUI8ZcEQmBctS8='
WHERE
key_id = '435d1184b39d99e48be9cce25c877777e4ff80dea76d187d758a668a7f651636'
AND (
token = 'WP1+yLVeZp2Jp0nyRQ6R0hgAariCNoUI8ZcEQmBctS8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)