UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OQ/EUWKs+dfQvwF5D2ixQSiN7QRdhmrQDmY7uiuJdQM=' 
WHERE 
  key_id = '347365472e3b679560db42a1d1b5b2d99aa60114bd77fc7efac830c10930b7ef' 
  AND (
    token = 'OQ/EUWKs+dfQvwF5D2ixQSiN7QRdhmrQDmY7uiuJdQM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049