UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2h4zVTd9cJRr3K6o6nKp5Mofp+7PXNkndNcLdpUvzHo=' 
WHERE 
  key_id = '0b71880e0730861e5735f9ba232db3c6acacd51888a57a09c3219662209780f3' 
  AND (
    token = '2h4zVTd9cJRr3K6o6nKp5Mofp+7PXNkndNcLdpUvzHo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020