UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JzkWgYKvIe8hmmsHZrFmesCDboLp/9XTbdhXe5NQicE=' 
WHERE 
  key_id = '758fa7f1d9e5b65acf2028470b1b2e4fec43dcbf9b11b3804d4515c18bd118fd' 
  AND (
    token = 'JzkWgYKvIe8hmmsHZrFmesCDboLp/9XTbdhXe5NQicE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021