UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/rzwkSUvaVZb7ZGki9OYQ+fmN9LaLIt9zVuubvJxhBY=' 
WHERE 
  key_id = '4b5af29e798f02ae634f9b26496ee209cf216be048c5e0c353b5007531e1bf63' 
  AND (
    token = '/rzwkSUvaVZb7ZGki9OYQ+fmN9LaLIt9zVuubvJxhBY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044