UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FXgzKT3qpHtAcFDomDOsi5dNlk/eVAtsOzH9xR44e6c='
WHERE
key_id = '6064d3f4bced545266542cbab174f46e2d6582f53f396f4994e9e19b1a428df2'
AND (
token = 'FXgzKT3qpHtAcFDomDOsi5dNlk/eVAtsOzH9xR44e6c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)