UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'f3ZoUdus2WGsnpAgf4lw6Wo+tFBndUJF5Em+vTkB9sc=' 
WHERE 
  key_id = '6968c990073baf9af0fdfab9f567051795218d252e61925a7f1f6fb543bb5c43' 
  AND (
    token = 'f3ZoUdus2WGsnpAgf4lw6Wo+tFBndUJF5Em+vTkB9sc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045