UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '86bevV5UG+fCRTcQeUpbnL6LpYzRG1G5ZN4IoWTvPJQ=' 
WHERE 
  key_id = '69a36f52dab7139f59f8e63baeae9ece6d2eb06fdd38a458003ea17111169f41' 
  AND (
    token = '86bevV5UG+fCRTcQeUpbnL6LpYzRG1G5ZN4IoWTvPJQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030