UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4CUwW0DFSD1zT54igUbP9r+lJ9sHlwQLvQWdpFRY5q8=' 
WHERE 
  key_id = '3b15e6419b5a0fb1f1986235f6a9d043594db0dfe349add48eb1e2ce1d0d4b0c' 
  AND (
    token = '4CUwW0DFSD1zT54igUbP9r+lJ9sHlwQLvQWdpFRY5q8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030