UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+yAJFznh/PZgm6UwwIVxbcBOUStol7c8w0/qjRb/UJs=' 
WHERE 
  key_id = 'f4bb96771669778b7eb38e1af5b19a7f7e6de476a00fd6c2404fcef57ae4e63b' 
  AND (
    token = '+yAJFznh/PZgm6UwwIVxbcBOUStol7c8w0/qjRb/UJs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031