UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iUFPxE8dWv/mszY6cuHmeQeVKP2Y+0r85z2ty9+c5N8=' 
WHERE 
  key_id = '2815dc411a4349bd87f06d1157e4b5895c92e6e15aaad5080ec78011af23ebcf' 
  AND (
    token = 'iUFPxE8dWv/mszY6cuHmeQeVKP2Y+0r85z2ty9+c5N8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026