UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fvW0gmWnqKairdrqbWQYfFqlvb5FqkaY02DcYKD1lMY=' 
WHERE 
  key_id = '735e78c0d5e4961d019731f8271d0b5267229cd96bc9586ceaf89cac8c1091c1' 
  AND (
    token = 'fvW0gmWnqKairdrqbWQYfFqlvb5FqkaY02DcYKD1lMY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00274