UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/k9mTruC5raY4KbitAThGLPMTDBU8XEh9wnUol9Ejy4=' 
WHERE 
  key_id = '0f43d3be970ba31cc0db1fe7944493bad8d887708c0c9a3317f5dceb000975bd' 
  AND (
    token = '/k9mTruC5raY4KbitAThGLPMTDBU8XEh9wnUol9Ejy4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042