UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yzcypythTrzNyJPQnC7Er5CEiwi1zBVir/X6C+ZEAL8=' 
WHERE 
  key_id = '58c09c9d1fe27f3160f02a965c0dad19be9f8dabbd7112c1ed41d46a2d2bbc81' 
  AND (
    token = 'yzcypythTrzNyJPQnC7Er5CEiwi1zBVir/X6C+ZEAL8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030